]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
baseIcon: Align labels to the center
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 3 Jul 2019 16:27:21 +0000 (13:27 -0300)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 24 Jul 2019 21:55:50 +0000 (18:55 -0300)
Ensure icon labels are aligned to the center, both
vertically and horizontally. This will be required
for using BaseIcons as drag actors.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/643

js/ui/iconGrid.js

index d5f600513db7dcbc71c401ce434c2fe46d9ea395..c74ff4361a01da7c616cdab74b862b11a1f377d5 100644 (file)
@@ -57,6 +57,10 @@ class BaseIcon extends St.Bin {
 
         if (params.showLabel) {
             this.label = new St.Label({ text: label });
+            this.label.clutter_text.set({
+                x_align: Clutter.ActorAlign.CENTER,
+                y_align: Clutter.ActorAlign.CENTER
+            });
             this._box.add_actor(this.label);
         } else {
             this.label = null;